Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix version check crash #6158

Merged
merged 5 commits into from
Sep 25, 2023

Conversation

retailcoder
Copy link
Member

@retailcoder retailcoder commented Sep 22, 2023

DockableWindowHost in RD2.x is still consistently throwing on my machine (interestingly, not RD3's), so I couldn't fully test the initialization sequence - but the version check command is should no longer throw.

Bonus, made the API base url configurable via a hidden <ApiBaseUrl> setting in the <GeneralSettings> section; value must end with a slash, and the reason it's there is because the Azure-hosted API URL contains the deployment timestamp, which means it's going to change whenever a new build is deployed, so whether it's GoDaddy returning 503 or Azure returning 404 the version check is going to end up failing no matter what - hence making it catch and log (at warn level) any exceptions thrown.

Having the ability to set the base URL without needing to re-install RD felt like a good idea.

Closes #6157
Closes #6156
Closes #6153
Closes #6152

@rubberduck-vba-releasebot
Copy link
Member

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #6158 (4038174) into next (5a02aa5) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #6158   +/-   ##
=======================================
  Coverage   97.58%   97.58%           
=======================================
  Files           4        4           
  Lines         413      413           
  Branches       28       28           
=======================================
  Hits          403      403           
  Misses          6        6           
  Partials        4        4           

@@ -53,40 +53,31 @@ protected override async void OnExecute(object parameter)
Logger.Info("Executing version check...");

var tokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(5));
await _versionCheck
.GetLatestVersionAsync(settings, tokenSource.Token)
.ContinueWith(t =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the problem; the service's return value should have been awaited here, not task-continued like this.

@retailcoder retailcoder merged commit 4d4853b into rubberduck-vba:next Sep 25, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Daniel Lellouche Popup error at startup Error during version check at start-up Bug with JIT-Compiler
2 participants